<!DOCTYPE html>
<html ng-app="app" lang="en">
    <head>
        <meta charset="UTF-8">
        <title ng-bind="title"></title>
        <link rel="stylesheet" href="../../style/css/bootstrap.css">
        <link rel="stylesheet" href="../../style/css/matrix-style.css">
        <link rel="stylesheet" href="../loader/loader.css">
        <link rel="stylesheet" href="checkbox.css">
        <script src="../../../node_modules/angular/angular.js"></script>
        <script src="../../a.ui.js"></script>
        <script src="../common/store.js"></script>
        <script src="../loader/loader.js"></script>
        <script src="checkbox.js"></script>
        <script src="checkbox-group.js"></script>
        <script>
            // bootstrap app
            var app = angular.module('app', ['a.ui']);
            app.run(function ($rootScope) {
                $rootScope.title = 'CheckBoxGroup';
                $rootScope.hobby = [
                    {name: '篮球', value: 1},
                    {name: '足球', value: 2},
                    {name: '乒乓球', value: 3}
                ];
                $rootScope.data = ['篮球', '足球', '乒乓球'];
                $rootScope.choose1 = [3, 1];
                $rootScope.choose2 = ['足球'];
                $rootScope.choose3 = [1];
                $rootScope.param = {};
            });
        </script>
    </head>
    <body>
        <div class="ui container">
            <h1 class="text-center" ng-bind="title"></h1>
            <a-checkbox-group ng-model="choose1" data="hobby" display-field="name" value-field="value"></a-checkbox-group>
            choose1选择结果: <span ng-bind="choose1|json"></span>
            <hr>
            <a-checkbox-group ng-model="choose2" data="data"></a-checkbox-group>
            choose2选择结果: <span ng-bind="choose2|json"></span>
            <hr>
            params: <input type="text" ng-model="param.orgCode">
            <a-checkbox-group ng-model="choose3" api="checkbox-group.demo.json" param="param" display-field="name" value-field="value"></a-checkbox-group>
            choose3选择结果: <span ng-bind="choose3|json"></span>
        </div>
    </body>
</html>